<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
    <meta name="renderer" content="webkit">
    <meta name="keywords" content=" "/>
    <meta name="description" content=" "/>
    <title>新闻中心_{$config['site_name']}</title>
    <link rel="stylesheet" href="__ADDON__/css/swiper.css">
    <link rel="stylesheet" href="__ADDON__/css/style.css">
    <link rel="stylesheet" href="__ADDON__/css/media.css">
    <link rel="shortcut icon" href="__ADDON__/images/favicon.ico">
</head>
<body>
<!--头部-->
{include file="index/header" /}
<!--内容-->
<div id="bann" style="background-image: url({$config['banner4']});">
    <div class="container">
        <div class="t1">
            NEWS<br>
        </div>
        <div class="t2">
            <span>紧密跟随国家产业指导及技术发展</span>
        </div>
    </div>
</div>

    <div id="nav2">
        <div class="sub-menu ">
            <div class="main container">
                <div class="sub-nav">
                    <div class="items">
                        {foreach name='newscategory' id='vo'}
                        <a {if condition="$vo['id'] eq $id" } class="active" {/if} href="{:addon_url('wwh/index/news', [':id'=>$vo['id']])}">{$vo['name']}</a><i></i>
                        {/foreach}
                    </div>
                </div>
                <div class="hamb">当前位置：新闻中心</div>
            </div>
        </div>
    </div>

<div id="news">
<div class="news_con newsbox">
    <div class="container pr clearfix">
        <div class="artInfo-left">
            <div class="newslist">
                <ul>
                    <div id="shuju">
                    {volist name="list" id="vo"}
                    <li>
                        <div class="N-pic ofH com-img">
                            <a href="{:addon_url('wwh/index/news_detail',[':id'=>$vo['id']])}"><img src="{$vo['image']}" alt=""></a>
                        </div>

                        <div class="N-note">
                            <h4><a href="{:addon_url('wwh/index/news_detail',[':id'=>$vo['id']])}">{$vo['newsname']}</a></h4>
                            <p>​{$vo['summary']}</p>
                            <a href="{:addon_url('wwh/index/news_detail',[':id'=>$vo['id']])}" class="more">查看详情</a>
                        </div>
                    </li>
                    {/volist}
                    </div>
                </ul>
            </div>
            <div class="fenye">{$page}</div>
        </div>

        <div class="artInfo-right">
            <div class="aiAbout-news">
                <div class="top">热门文章</div>
                            <ul class="list">
                                {volist name="news2" id="vo"}
                                <li>
                                    <div class="date">{$vo.time|strtotime|date="Y年m月d日",###}</div>
                                    <div class="name"><a href="{:addon_url('wwh/index/news_detail',[':id'=>$vo['id']])}" title="">{$vo['newsname']}</a></div>
                                </li>
                                {/volist}
                            </ul>
            </div>
        </div>
    </div>
</div>
</div>

<!--底部-->
{include file="index/footer" /}
<script src="__ADDON__/js/jquery.min.js"></script>
<script src="__ADDON__/js/style.js"></script>

<script type="text/javascript">
    $('.header-container .clearfix .H-nav .Hnav-menu').eq(4).addClass('nav-active');//顶部导航变色

    $(document).on('click','.pagination a',function(event){
        event.preventDefault();
        _this = $(this);
        var href = _this.attr("href");
        $.ajax({
            url:href,
            dataType:'json',
            type:"post",
            data:[],
            success:function(res){
                console.log(res);
                $("#shuju").empty();
                var str = "";
                $.each(res.list.data,function(k,v){
                    str+='<li>\
                        <div class="N-pic ofH com-img">\
                        <a href="{:addon_url('wwh/index/news_detail',[':id'=>"'+v.id+'"])}"><img src="'+v.image+'" alt=""></a>\
                        </div>\
                        <div class="N-note">\
                        <h4><a href="{:addon_url('wwh/index/news_detail',[':id'=>"'+v.id+'"])}">'+v.newsname+'</a></h4>\
                        <p>​'+v.summary+'</p>\
                    <a href="{:addon_url('wwh/index/news_detail',[':id'=>"'+v.id+'"])}" class="more">查看详情</a>\
                        </div>\
                        </li>';
                });
                location.href = "#nav2";
                $('#shuju').html(str);
                $(".fenye").html(res.page);
            }
        })
    });
</script>
</body>
</html>
